<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //函数的定义方式
        //1.自定义函数(命名函数)
        function fn(){}
        //2.函数表达式(匿名函数)
        var fun = function(){}
        //3.利用new Function('参数1','参数2','函数体');
        var f = new Function('a','b','console.log(a+b)');
        f(1,2);
        //4.所有函数都是Function的实例(对象)
        console.dir(f);
        //5.函数也属于对象
        console.log(f instanceof Object);
        console.log(typeof(12));
        var arr = [1,2,3];
        console.log(arr instanceof Array);
    </script>
</body>
</html>